PdhGetCounterPathFromList (VB)

The Visual Basic PdhGetCounterPathFromList function copies the counter path referenced by the Index parameter from a counter path list created by the user from the most recent call to the PdhCreateCounterPathList function.

PdhGetCounterPathFromList(

    ByVal Index as Long,

 

    ByVal Buffer as String,

 

    ByVal BufferLength as Long)

 

        as Long

 

 

Parameters

Index

The index of the counter path to retrieve. This must be a value that is greater than or equal to 1, and less than or equal to the value returned by the PdhCreateCounterPathList function.

Buffer

A dimensioned and initialized string that will receive the counter path that corresponds to the value of the Index parameter.

BufferLength

The maximum number of characters that will fit in the string referenced by Buffer.

 

Return Values

The function returns the number of characters copied to Buffer.